<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>简答组卷</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
		<script type="text/javascript" src="__JS__/jshelper.js"></script> 
		<!--  script type="text/JavaScript">
			function saqedit(id,testid){
				window.location.href="__URL__/saqtedit/testid/"+testid+"id/"+id;
			}
			function saqdelete(id,testid){
				if (confirm("你确定要删除吗")==true) {
					//posthelper([["id",id],],'__URL__/saqdelete');
					postwith('__URL__/saqdelete',{id:id});
				}
			}
			
			window.onload=show;
		</script>-->
		<script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
       	<script type="text/javascript" src="__JS__/jQuery/jquery.form.js"></script>
	</head>
	<body>	
		<!-- layout::Auth:header::0 -->
    	<div class="container-fluid">
     		<div class="row-fluid">
  			  <!-- layout::Auth:leftmenu::0 -->
              	 <div class="span8">
                    <div class="hero-unit">
                  	<h1>简答组卷</h1>
                    <p style="font-size:12px">当前位置：
                        <a href='__APP__/index/index'>主页</a>>
                        <a href='__URL__/index'>后台管理</a>>
                        <a href='__URL__/choose1'>测试管理</a>>
                        <a href='__URL__/testdetail' >试题管理</a>>
                        <a href='__URL__/testpackage/id/<?php echo ($testid); ?>' >组卷</a>>
                        <a href="">简答组卷</a>
                     </p>
     				</div>
                  <form method="get" action="__URL__/saqtdetail1/id/<?php echo ($testid); ?>" class="form-inline" >
                      <input type="text" name="name"  placeholder="题目">
                          
                      <input type="text" name="nname"  placeholder="编辑者">
                           <code>所属课程</code>
                            <select name="cname">
                              <option ></option>
                              <?php if(is_array($cnlist)): $i = 0; $__LIST__ = $cnlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo1): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo1["name"]); ?>><?php echo ($vo1["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                    <input name="submit" type="submit" value="查询" class="btn btn-info">
                  </form>
			<!--显示题目-->
				<table width="100%" class="table table-striped table-bordered table-condensed">
					<thead>
						<tr id="table_saq_show_title">
							<th>题目名称</th>
							<th>所属课程</th>
							<th>编辑者</th>
						</tr>
					</thead>
					<load href"__PUBLIC__/js/list_show.js">
					<form id="form2" name="form2" method="post" action="__URL__/saqt_add">
					<input type='hidden' name='testid' value='<?php echo ($testid); ?>'>
					<tbody id="tab">
						<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><tr id="table_saq_show">
							<?php if($vo["isselect"] == 0): ?><td><input type='checkbox' name='id[]' value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["name"]); ?></td>
							<?php else: ?>
								<td style="width:150px;">(已添加)<?php echo ($vo["name"]); ?></td><?php endif; ?>
								<td style="width:180px;"><?php echo ($vo["cname"]); ?></td><!--所属课程-->
								<td style="width:180px;"><?php echo ($vo["nname"]); ?></td><!--所属课程-->
								<td style="display:none;"><?php echo ($vo["id"]); ?></td>	<!--题目ID-->
							</tr><?php endforeach; endif; else: echo "" ;endif; ?>
					</tbody>
					<input class="btn btn-info" type="button" onClick="javascript:for(var i=0;i<this.form.length;i++)this.form[i].checked=1;" value='全选'>|
					<input  class="btn btn-primary" type="button" onClick="javascript:for(var i=0;i<this.form.length;i++)this.form[i].checked=0;" value='取消全选'>|
					<input  class="btn btn-info" type="button" onClick="javascript:for(var i=0;i<this.form.length;i++)this.form[i].checked=!this.form[i].checked;" value='反选'>
					<!--  试卷名：
	            	<select name="testid">
	              		<?php if(is_array($tlist)): $i = 0; $__LIST__ = $tlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo1): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo1["id"]); ?>><?php echo ($vo1["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
	           		 </select>  -->
					&nbsp;<input type="submit" name="Submit" value="提交"  align="right" style="width:80px" class="btn btn-success"> 
				</form>
				</table>
			
				<p class="navbar-text pull-right"><?php echo ($page); ?></p>
		</div>
		</div>
        </div>
	</body>
</html>